//
//  HKBaseWebViewController.h
//  HKUtilities
//
//  Created by 胡锦涛 on 2018/11/14.
//  Copyright © 2018 胡锦涛. All rights reserved.
//

#import "HKBaseModuleController.h"
#import "HKProgressView.h"
#import <UIKit/UIKit.h>
#import "HKWebView.h"

NS_ASSUME_NONNULL_BEGIN

@interface HKBaseWebViewController : HKBaseModuleController<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler>
@property (nonatomic, assign) BOOL isPresent;
@property (nonatomic, strong) HKWebView *webView;
@property (nonatomic, strong) NSString  *urlString;
@property (nonatomic, assign) BOOL showShare;

@property (nonatomic, strong) UIProgressView  *progressView;
@property (nonatomic, strong) UIBarButtonItem *backItem;
@property (nonatomic, strong) UIBarButtonItem *closeItem;
@property (nonatomic, strong) HKProgressView *loadingView;

- (void)loadWithUrl:(NSString *)url;
-(void)refreshWithUrl:(NSString*)url;
- (void)reload;
- (void)backNative;

#pragma mark JS

/**
 * 登录操作完成后是否需要刷新web界面 传参sid
 */
@property (nonatomic, assign) BOOL isReload;

/**
 * 判断是否吊起loginFlage方法
 */
@property (nonatomic, assign) BOOL enter;

/**
 * 登录回调回来
 */
@property (nonatomic, assign) BOOL isLogin;
/**
 * JS回调之后的CallBack方法名
 */
@property (nonatomic, strong) NSString *callbackName;
@end

NS_ASSUME_NONNULL_END
